<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <script>
        // var x;


        // console.log(x);
    </script>
    <style>
        #body{background-color:#fff;}
        #bg{width:100%;height:100%;background-color: #fff}
    </style>

</head>
<body onkeydown=doKey(event) >
    <div id="bg">
        <button onclick="test()">点我</button>

    </div>
</body>
        <script>
            function test()
            {
                var bg = document.getElementById("bg");

                bg.style.backgroundColor="#000";
            }
        </script>
</html>